﻿using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        Random random = new Random();
        List<int> numbers = Enumerable.Range(0, 100)
                                       .Select(_ => random.Next(0, 1001))
                                       .ToList();

        var sortedNumbers = numbers.OrderByDescending(n => n).ToList();

        int sum = sortedNumbers.Sum();

        double average = sortedNumbers.Average();

        Console.WriteLine("排序后的整数列表：");
        foreach (var number in sortedNumbers)
        {
            Console.WriteLine(number);
        }
        Console.WriteLine($"总和：{sum}");
        Console.WriteLine($"平均数：{average}");

        Console.ReadLine();
    }
}
